import http from "./request";

// async function getList(params) {
//   let { data } = await http.get("/topics?tab=" + params.tab);
//   return data;
// }
//点击不同的tab请求不同的数据

async function getList(url, params) {
  let { data } = await http({
    method: "get",
    url: url,
    params: params,
  });
  return data;
}
async function getDetail(params) {
  let { data } = await http.get("/topic/" + params.id);
  return data;
}
//请求详情页的数据
export { getList, getDetail };
